package com.lsy.controller.front;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/front/index")
public class IndexFrontController {

	private ModelAndView view = new ModelAndView("/FrontEnd/index");

	@RequestMapping
	public ModelAndView index() {
		view.addObject("action", "index");
		return view;
	}

	/**
	 * 散标详细页面
	 * 
	 * @param id
	 *            散标的id
	 * @return
	 */
	@RequestMapping(params = "action=detail")
	public ModelAndView detail(int id) {
		view.addObject("productId", id);
		view.addObject("action", "detail");
		return view;
	}

	@RequestMapping(params = "action=user")
	public ModelAndView user() {
		view.addObject("action", "user");
		return view;
	}

}
